package com.meima.user.client;

import com.meima.client.config.DefaultFeignConfiguration;
import com.meima.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "userservice",configuration = DefaultFeignConfiguration.class ) // 指定feign，连接的服务对象名称
public interface UserClient {

    @GetMapping("user/{id}")
    public User findById(@PathVariable Long id);

    @GetMapping("user/name")
    public String name();

}
